
<#include "/common/head.html"/>


 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">
            <tr>
           		<th><span id="uname_label">用户名：</span></th>
               	<td>
					<span class="valueSpan"><pre>${model.uname!''}</pre></span>
           		</td>
            </tr>
            <tr>
           		<th><span id="idcard_label">新密码：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="password" name="passwd" id="passwd" value="" data-options="fit: true,required:true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="idcard_labe2">重复一遍：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="password" name="passwd2" id="passwd2" value="" data-options="fit: true,required:true"></input></div>
           		</td>
            </tr>
        </table>
    </form>
</div>
<script>

top.window.subPage.save = save;
function save() {
	if($('#passwd').val() != $('#passwd2').val()){
	    showWarnMsg("两次密码不一致！");
	    return;
	}
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {
			if(data.result == "success") {
				top.window.closeWindow();
				top.window.subPage.loadCurrDatagrid();
			}
		});
	}
}
function getParam() {
	var param = {
	     
	    "id": ${model.id}, 
       	    "model.uname": "${model.uname!''}",
       	    "model.passwd": getInputValue("passwd")
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
